Skip to content

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented Oct 2, 2025

Signed-off-by: Stefan Büringer buringerst@vmware.com

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #12291

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 2, 2025
@sbueringer sbueringer added the area/provider/control-plane-kubeadm Issues or PRs related to KCP label Oct 2, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Oct 2, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@sbueringer sbueringer changed the title [WIP] 🌱 KCP: Add current/desired objects to NotUpToDateResult [WIP] [DON'T REVIEW] 🌱 KCP: Add current/desired objects to NotUpToDateResult Oct 2, 2025
@sbueringer sbueringer force-pushed the pr-refactor-kcp-desired-state branch 5 times, most recently from 9e97a69 to c8b0bb8 Compare October 7, 2025 15:19
@sbueringer sbueringer changed the title [WIP] [DON'T REVIEW] 🌱 KCP: Add current/desired objects to NotUpToDateResult [WIP] 🌱 KCP: Add current/desired objects to NotUpToDateResult Oct 7, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@sbueringer sbueringer force-pushed the pr-refactor-kcp-desired-state branch from c8b0bb8 to 48ab737 Compare October 8, 2025 09:28
Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-refactor-kcp-desired-state branch from 48ab737 to 9dab202 Compare October 8, 2025 09:45
@sbueringer sbueringer changed the title [WIP] 🌱 KCP: Add current/desired objects to NotUpToDateResult 🌱 KCP: Add current/desired objects to NotUpToDateResult & refactor object creation Oct 8, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 8, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@sbueringer
Copy link
Member Author

/assign @fabriziopandini

/cc @stmcginnis @furkatgofurov7 @alexander-demicev @lentzi90 (if you want to take a look)

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a scary big refactor, might have been a good idea to break the various different refactors in distinctive commits.


// IsForJoin returns true if the KubeadmConfig is for a kubeadm join.
func (c *KubeadmConfig) IsForJoin() bool {
return c.Spec.JoinConfiguration.IsDefined()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubeadm allows you to pass all the kinds in the same yaml muilti doc. prints out a warning for init config if you pass it on join. that's how k-sigs/kind passes them.
is there a case where someone might define both the init and join configuration in the capi construct?

i'm trying to understand if this is the best method if a config is "for join".

Copy link
Member Author

@sbueringer sbueringer Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our use case (KCP) the KubeadmConfigs we create for join always have joinConfiguration set and the ones for init don't have it. So this is the best way I'm aware of to figure out if a KCP KubeadmConfig is for a join.

is there a case where someone might define both the init and join configuration in the capi construct?

KCP would never do it, but other folks might do whatever they want. So probably this should not be a method on the API type and instead just a local func in the places where we use it

Copy link
Member Author

@sbueringer sbueringer Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to local private funcs

Copy link
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely a bit over my head still, but for what it is worth, it looks reasonable to me.
A few minor notes below.

@sbueringer
Copy link
Member Author

Thx everyone. All findings should be addressed. PTAL and +1 / resolve accordingly

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@fabriziopandini
Copy link
Member

fabriziopandini commented Oct 9, 2025

Nice, one step closer to in-place!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 18ab74f34bec017d03c6892976e1848a6eb5152f

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 9, 2025
@sbueringer sbueringer added lgtm "Looks good to me", indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. labels Oct 9, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@stmcginnis
Copy link
Contributor

/lgtm

Copy link
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@fabriziopandini
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2025
@k8s-ci-robot k8s-ci-robot merged commit 37dc14b into kubernetes-sigs:main Oct 10, 2025
20 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Oct 10, 2025
@sbueringer sbueringer deleted the pr-refactor-kcp-desired-state branch October 10, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/control-plane-kubeadm Issues or PRs related to KCP cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants